import request from '@/utils/request'

const api_name = '/cmsservice/banneradmin'

export default {
//1. banner列表 分页
  pageListBanner(current, limit) {
    return request({
      url: `${api_name}/pageBanner/${current}/${limit}`,
      method: 'get'
    })
  },
  //2. 新增banner
  save(banner) {
    return request({
      url: `${api_name}/addBanner`,
      method: 'post',
      data: banner
    })
  },
  //3. 回显banner信息
  getById(id) {
    return request({
      url: `${api_name}/get/${id}`,
      method: 'get'
    })
  },
  //4. 更新banner信息
  updateById(banner) {
    return request({
      url: `${api_name}/update`,
      method: 'put',
      data: banner
    })
  },
  //5. 删除
  removeById(id){
    return request({
      url: `${api_name}/${id}`,
      method: 'delete'
    })

  },
}
